//商品分类路由
const express = require('express')
const routerCate = express.Router()
    //引入商品分类的处理函数
const categoriesHandle = require('../router_handler/categories')
    //商品分类数据列表
routerCate.get('/categories', categoriesHandle.getCategories)
    //添加分类
routerCate.post('/categories', categoriesHandle.addCategories)
    //根据 id 查询分类
routerCate.get('/categories/:id', categoriesHandle.searchCategories)
    //编辑提交分类
routerCate.put('/categories/:id', categoriesHandle.updateCategories)
    //删除分类
routerCate.delete('/categories/:id', categoriesHandle.deleteCategories)

module.exports = routerCate